package com.park.service.impl.user;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.park.client.model.user.MenuModel;
import com.park.client.service.user.MenuService;
import com.park.dao.user.MenuMapper;
import com.park.service.impl.base.BaseServiceImpl;

@Service("menuService")
public class MenuServiceImpl extends BaseServiceImpl<MenuModel> implements MenuService {
	
	@Autowired
	private MenuMapper menuMapper;

	@Override
	public boolean deleteByPrimaryKey(Long id) {
		return menuMapper.deleteByPrimaryKey(id)==1;
	}

	@Override
	public boolean insert(MenuModel record) {
		return menuMapper.insert(record)==1;
	}

	@Override
	public boolean insertSelective(MenuModel record) {
		return menuMapper.insertSelective(record)==1;
	}

	@Override
	public MenuModel selectByPrimaryKey(Long id) {
		return menuMapper.selectByPrimaryKey(id);
	}

	@Override
	public boolean updateByPrimaryKeySelective(MenuModel record) {
		return menuMapper.updateByPrimaryKeySelective(record)==1;
	}

	@Override
	public boolean updateByPrimaryKey(MenuModel record) {
		return menuMapper.updateByPrimaryKey(record)==1;
	}

	@Override
	public List<MenuModel> listMenus(MenuModel menu) {
		return menuMapper.listMenus(menu);
	}

	@Override
	public List<MenuModel> selectAll() {
		return menuMapper.selectAll();
	}

	@Override
	public boolean updateState(Long menuID) {
		return menuMapper.updateState(menuID)==1;
	}

	@Override
	public List<MenuModel> selectPagination(MenuModel t) {
		return menuMapper.selectPagination(t);
	}

	@Override
	public Integer selectTotal(MenuModel t) {
		return menuMapper.selectTotal(t);
	}

	@Override
	public Integer selectMaxSort(Long pid) {
		return menuMapper.selectMaxSort(pid);
	}

	@Override
	public boolean deleteByModel(MenuModel t) {
		return menuMapper.deleteByModel(t)==1;
	}

}
